<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/support/taglibs.jsp" %>
<stripes:layout-render name="/support/layout/standard.jsp" title="Organizations" page="organizations">
<stripes:layout-component name="contents">

  Below is a list of each organization's name and contact researcher.  Click on <br />
  the organization name to view the organization's information, or the contact <br />
  researcher to view the researcher's information.
  
  <br /><br />
  
  <a href="organization_form.jsp">Create Organization</a>
  
  <br /><br />
   
   <jsp:useBean id="isernManager" scope="page"
           class="edu.hawaii.myisern.model.IsernManager"/>
   
<table class="list">
  <tr>
    <th>Name</th>
    <th>Contact</th>
  </tr>
  <c:forEach items="${isernManager.organizations}" var="organization" varStatus="rowstat"> 
    <tr class="${rowstat.count mod 2 == 0 ? "even" : "odd"}">
      <td>
        <stripes:link href="OrganizationForm.action" event="view">
          ${organization.name}
          <stripes:param name="id" value="${organization.name}"/>
        </stripes:link>
      </td>
      <td>
        <stripes:link href="ResearcherForm.action" event="view">
          ${organization.contact}
          <stripes:param name="id" value="${organization.contact}"/>
        </stripes:link> 
      </td>
    </tr>
  </c:forEach>
</table>

<br /><br />
   
    </stripes:layout-component>
</stripes:layout-render>
